//SysEventRecord.h 

#pragma once

#include <string>
#include <fstream>
#include "AutoCriticalLock.h"


#ifdef UNICODE
typedef std::wstring STLString;
#else
typedef std::string STLString;
#endif


class CSysEvtRecorder
{
private:
	STLString m_strLogFileName;
	std::ofstream m_outStream;
	CriticalLOCK m_csFileLock;
public:
	CSysEvtRecorder();
	virtual ~CSysEvtRecorder(void);

	void SetAndOpenRecorderFile(LPCTSTR szLogFileName);
	void RecorderEvent(int nEvtNo,CStringA strTime,CStringA strDescribe);
};
